Package-level declarations
Contains all classes/methods for the Mood Analytics feature
Types
Manages the flow of messages (sending and generating bot replies) and the logic for different activities in the chatbot.
ViewModel responsible for managing chatbot interactions. Handles message processing, chat logs, and user interactions.
Represents the different branches or types of conversation in the chatbot dialogue. Each branch corresponds to a specific stage or activity in the cognitive behavioral therapy (CBT) process.
Functions
Composable function to display a bot message in the chat.
Displays the bot's message in the chat log, based on the provided branch and message number. The message is shown on the left side of the screen.
Composable function for displaying the chatbot page.
Composable function for displaying the content of the Chatbot page. It handles the layout of messages between the user and the bot, along with the display of branch selection buttons and message input. It relies on additional composables such as UserMessageItem
and BotMessageItem
.
Main function for the ChatListPage, used to display a list of previously completed chatLogs or cognitive behavioural therapy activities.
Composable, displays a ChatLog page that shows previously saved/completed cognitive behavioral therapy activities. This page includes the top app bar and content of the log.
Composes the content of the chat log page by displaying the log's details.
Converts a Long
representing milliseconds since the epoch to a Date
object.
Converts milliseconds to a date string in "MM/dd/yyyy" format.
Corrects the date offset by adding one day to the provided date in milliseconds.
Composable for a date picker field that triggers a modal dialog to select a date.
Composable for a modal date picker dialog, used to select a date.
Helper function for displaying the different chat branches on buttons.
Returns the string description for the specified ChatBranch
to be used in button selections.
Returns the display name for a given log type.
Composable function to display a user message in the chat.
Displays a user's message in the chat log with a timestamp. The message is shown on the right side of the screen.